how to find the perimeter and area of a triangle